package znbkTestPaperCtfd.api;

import com.example.lancooznbk.service.HttpPostServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import retrofit2.Retrofit;
import rx.Observable;
import znbkTestPaperCtfd.entity.WrongTopicTutoringModelEntity;

/**
 * Created by Administrator on 2018\2\23 0023.
 */

public class WrongTopicTutoringPaperApi extends BaseApi {

    private WrongTopicTutoringModelEntity mWrongTopicTutoringModelEntity;

    public WrongTopicTutoringModelEntity getWrongTopicTutoringModel() {
        return mWrongTopicTutoringModelEntity;
    }

    public void setWrongTopicTutoringModel(WrongTopicTutoringModelEntity wrongTopicTutoringModelEntity) {
        this.mWrongTopicTutoringModelEntity = wrongTopicTutoringModelEntity;
    }


    public WrongTopicTutoringPaperApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostServer httpPostServer = retrofit.create(HttpPostServer.class);

        return httpPostServer.postWrongTopicTutoringJson(mWrongTopicTutoringModelEntity);
    }
}
